package com.cq.hd.order.api.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.cq.hd.common.serialize.Decimal2Serializer;
import com.fasterxml.jackson.annotation.JsonFormat;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 分销订单详情（经纪人查看）
 */
@Data
public class AppAgentOrderDetailVo implements Serializable {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "活动id")
    private Long activeId;

    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @ApiModelProperty(value = "订单类型(1-团购订单,2-报名订单,4-团购+报名订单,5积分订单)")
    private Integer orderType;

    @ApiModelProperty(value = "活动标题")
    private String activeTitle;

    @ApiModelProperty(value = "活动图片")
    private String activeImg;

    @ApiModelProperty(value = "活动开始时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "活动结束时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "活动有效开始时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime validStartTime;

    @ApiModelProperty(value = "活动有效结束时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime validEndTime;

    @ApiModelProperty(value = "补贴类型(0-未设置,1-自动按比例分摊,2-手动设置)")
    private Integer subsidyState;

    @ApiModelProperty(value = "多件多折状态(1-关闭，2-开启)")
    private Integer discountState;

    @ApiModelProperty(value = "是否是阶梯价格(1-否，2-是)")
    private Integer stepPriceState;

    @ApiModelProperty(value = "分销开启状态(1-关闭，2-开启)")
    private Integer agentState;

    @ApiModelProperty(value = "核销方式(1-线上核销，2-线下核销)")
    private Integer verifyMethod;

    @ApiModelProperty(value = "订单状态(1-待支付,2-待核销,3-核销中,4-已取消,5-已完成,6-已关闭)")
    private Integer orderState;

    @ApiModelProperty(value = "下单数量")
    private Integer orderNum;


    @ApiModelProperty(value = "活动价格(如果是报名活动的阶梯价格，则是阶梯价格的最大价格)")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal activePrice;


    @ApiModelProperty(value = "订单总额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal orderPrice;


    @ApiModelProperty(value = "实付金额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal payPrice;


    @ApiModelProperty(value = "红包金额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal redPacketAmt;


    @ApiModelProperty(value = "优惠金额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal discountAmt;


    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal actualCommissionAmt;

    @ApiModelProperty(value = "其他权益")
    private String otherEquity;

    @ApiModelProperty(value = "支付时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime payTime;

    @ApiModelProperty(value = "下单时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime orderTime;

    @ApiModelProperty(value = "订单取消时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime cancelTime;

    @ApiModelProperty(value = "订单取消原因")
    private String cancelReason;

    @ApiModelProperty(value = "订单完成时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime finishTime;

    @ApiModelProperty(value = "订单关闭时间")
    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    private LocalDateTime closeTime;

    @ApiModelProperty(value = "订单备注")
    private String orderNote;


    @ApiModelProperty(value = "下单用户昵称")
    private String orderNickName;

    @ApiModelProperty(value = "下单用户头像")
    private String orderAvatar;

    @ApiModelProperty(value = "策划人昵称")
    private String businessNickName;

    @ApiModelProperty(value = "策划人头像")
    private String businessAvatar;


    @ApiModelProperty(value = "推广佣金")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal commissionAmt = BigDecimal.ZERO;

}
